package com.edu.lingnan.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author shaosen
 * @Description //TODO
 * @Date 8:56 2020/6/6
 */
@RestController
public class ConfigClientController {
    @Value("${spring.application.name}")
    private String application;
    @Value("${eureka.client.service-url.defaultZone}")
    private String eurekaServer;
    @Value("${server.port}")
    private String port;

    @RequestMapping("/config")
    public String getConfig(){
        return "application:" + application +
                ",eurekaServer:" + eurekaServer +
                ",port:" + port;
    }
}
